package com.iss.card.view.model;

import android.text.TextUtils;
import android.util.Log;

import com.iss.card.webservice.BaseModel;

public class CardDetailHistoryModel extends BaseModel {

	public String userName;
	public String cDate;
	public String storeName;
	public String saleMoney;
	public String amount;
	public String discount;
	public String useScore;
	public String useMoney;
	public String useTimes;
	public String userMobile;
	public String scId;
	public String loginID;

	private String orderID;
	private String orderStatus;

	private String orderNo;
	private String orderDate;
	private String consumedStore;
	private String consumedNumber;
	private String orderPayer;
	private String orderAmount;
	private String usePoints;
	private String useNumber;
	private String useDiscount;
	private String useStoredValue;
	private String useCash;

	private String gotPoints;

	private static final String ORSER_ID = "orderID";
	private static final String ORDER_STATUS = "orderStatus";
	private static final String ORDER_NO = "orderNo";
	private static final String ORDER_DATE = "orderDate";
	private static final String CONSUMED_STORE = "consumedStore";
	private static final String CONSUMED_NUMBER = "consumedNumber";
	private static final String ORDER_PAYER = "orderPayer";
	private static final String ORDER_AMOUNT = "orderAmount";
	private static final String USE_POINTS = "usePoints";
	private static final String USE_NUMBER = "useNumber";
	private static final String USE_DISCOUNT = "useDiscount";
	private static final String USE_STORED_VALUE = "useStoredValue";
	private static final String USE_CASH = "useCash";
	private static final String GOT_POINTS = "gotPoints";

	@Override
	public void addValues(String tempString, String valueString,
			BaseModel baseMode) {
		// TODO Auto-generated method stub

		if (tempString == ORSER_ID) {
			setOrderID(valueString);
		} else if (tempString == ORDER_STATUS) {
			setOrderStatus(valueString);
		} else if (tempString == ORDER_NO) {
			setOrderNo(valueString);
		} else if (tempString == ORDER_DATE) {
			setOrderDate(valueString);
		} else if (tempString == CONSUMED_STORE) {
			setConsumedStore(valueString);
		} else if (tempString == CONSUMED_NUMBER) {
			setConsumedNumber(valueString);
		} else if (tempString == ORDER_PAYER) {
			setOrderPayer(valueString);
		} else if (tempString == ORDER_AMOUNT) {
			setOrderAmount(valueString);
		} else if (tempString == USE_POINTS) {
			setUsePoints(valueString);
		} else if (tempString == USE_NUMBER) {
			setUseNumber(valueString);
		} else if (tempString == USE_DISCOUNT) {
			setUseDiscount(valueString);
		} else if (tempString == USE_STORED_VALUE) {
			setUseStoredValue(valueString);
		} else if (tempString == USE_CASH) {
			setUseCash(valueString);
		} else if (tempString == GOT_POINTS) {
			setGotPoints(valueString);
		}

		baseMode = this;
	}

	public String getOrderID() {
		return orderID;
	}

	public String getOrderStatus() {
		return orderStatus;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public String getOrderDate() {
		return orderDate;
	}

	public String getConsumedStore() {
		return consumedStore;
	}

	public String getConsumedNumber() {
		return consumedNumber;
	}

	public String getOrderPayer() {
		return orderPayer;
	}

	public String getOrderAmount() {
		return orderAmount;
	}

	public String getUsePoints() {
		return usePoints;
	}

	public String getUseNumber() {
		return useNumber;
	}

	public String getUseDiscount() {
		return useDiscount;
	}

	public String getUseStoredValue() {
		return useStoredValue;
	}

	public String getUseCash() {
		return useCash;
	}

	public String getGotPoints() {
		return gotPoints;
	}

	public void setOrderID(String orderID) {
		this.orderID = orderID;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public void setOrderDate(String orderDate) {
		this.orderDate = orderDate;
	}

	public void setConsumedStore(String consumedStore) {
		this.consumedStore = consumedStore;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}

	public void setConsumedNumber(String consumedNumber) {
		this.consumedNumber = consumedNumber;
	}

	public void setOrderPayer(String orderPayer) {
		this.orderPayer = orderPayer;
	}

	public void setOrderAmount(String orderAmount) {
		this.orderAmount = orderAmount;
	}

	public void setUsePoints(String usePoints) {
		this.usePoints = usePoints;
	}

	public void setUseNumber(String useNumber) {
		this.useNumber = useNumber;
	}

	public void setUseDiscount(String useDiscount) {
		this.useDiscount = useDiscount;
	}

	public void setUseStoredValue(String useStoredValue) {
		this.useStoredValue = useStoredValue;
	}

	public void setUseCash(String useCash) {
		this.useCash = useCash;
	}

	public void setGotPoints(String gotPoints) {
		this.gotPoints = gotPoints;
	}

	public String getDisplayedDiscount() {
		return TextUtils.isEmpty(useDiscount) ? "" : String.valueOf(Float
				.valueOf(useDiscount) * 10);
	}
}
